﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Assignment.aspx.cs" Inherits="CRM.Web.CallBackManage.Assignment" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/assignment.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    
    <script type="text/javascript">
        $(document).ready(function() {
            $(".cbAll").live("click", function() {
                if ($(this).children().eq(0).attr("checked") == "checked") {
                    $(".cbItem").children().each(function() {
                        $(this).attr("checked", "checked");
                    });
                }
                else {
                    $(".cbItem").children().each(function() {
                        $(this).attr("checked", false);
                    });
                }
            });

            $(".cbAllLost").live("click", function() {
                if ($(this).children().eq(0).attr("checked") == "checked") {
                    $(".cbItemLost").children().each(function() {
                        $(this).attr("checked", "checked");
                    });
                }
                else {
                    $(".cbItemLost").children().each(function() {
                        $(this).attr("checked", false);
                    });
                }
            });
        });
    </script>    
    
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" id="tTitle">
        <tr>
            <td class="left">
                <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
            </td>
            <td class="middle">
                <div class="pagetitle">
                    <div>
                        <asp:Label ID="lblTitle" runat="server">回访任务分配</asp:Label></div>
                </div>
            </td>
            <td class="right">
                <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
            </td>
        </tr>
    </table>
    <div id="divMain">
        <div style="width: 100%" id="tBodyMain">
            <table cellpadding="0" cellspacing="0" style="width: 100%; border-bottom: #6699ff 1px solid;">
                <tr>
                    <td style="width: auto; border-right: #6699ff 1px solid; vertical-align: top;">
                        <table border="0" cellpadding="0" cellspacing="0" class="assign">
                            <caption>
                                回访任务信息</caption>
                            <tr>
                                <td class="title">
                                    所属事业部：
                                </td>
                                <td class="content">
                                    <asp:UpdatePanel ID="UpdatePanel6" runat="server">
                                        <ContentTemplate>
                                            <asp:DropDownList ID="ddlBusinessDivision" runat="server" CssClass="ddl" AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlBusinessDivision_SelectedIndexChanged">
                                            </asp:DropDownList>
                                            &nbsp;
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td class="title">
                                    分配部门：
                                </td>
                                <td class="content">
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <ContentTemplate>
                                            <asp:DropDownList ID="ddlDepartment" runat="server" CssClass="ddl" AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlDepartment_SelectedIndexChanged">
                                            </asp:DropDownList>
                                            &nbsp;
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td class="title">
                                    活动名称：
                                </td>
                                <td class="content">
                                    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                        <ContentTemplate>
                                            <asp:DropDownList ID="ddlCallBackPlan" runat="server" CssClass="ddl" AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlCallBackPlan_SelectedIndexChanged">
                                            </asp:DropDownList>
                                            &nbsp;
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td class="title">
                                    记录数：
                                </td>
                                <td class="content">
                                    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                        <ContentTemplate>
                                    <asp:Label ID="lblCount" runat="server"></asp:Label></ContentTemplate>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                            <tr>
                                <td class="title">
                                    分配数：
                                </td>
                                <td class="content">
                                    <asp:TextBox ID="txtAssignmentNumber" runat="server" CssClass="txt" ></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="content" colspan="2">
                                    <div class="btndiv">
                                        <asp:Button runat="server" ID="btnAssign" CommandName="Assign" Text="分 配" OnClick="btnAssign_Click"
                                            CssClass="btn"></asp:Button>
                                        <input id="btnCancel" runat="server" type="button" value="返 回" class="btn title_fh" />
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="content" colspan="2" style="">
                                </td>
                            </tr>
                            <tr style="height: 100%; line-height: 100%;">
                                <td class="title">
                                </td>
                                <td class="content">
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td style="width: 300px; border-right: #336699 1px solid; vertical-align: top;">
                        <table border="0" cellpadding="0" cellspacing="0" class="assign">
                            <caption>
                                目标操作员信息</caption>
                            <tr>
                                <td class="content">
                                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                        <ContentTemplate>
                                            <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False"
                                                SortExpressionValue="LOGINNAME">
                                                <Columns>
                                                    <asp:TemplateField>
                                                        <HeaderTemplate>
                                                            <asp:CheckBox ID="cbAll" CssClass="cbAll" runat="server" />
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="cbItem" CssClass="cbItem" runat="server" />
                                                        </ItemTemplate>
                                                        <ItemStyle Width="28px" HorizontalAlign="Center" />
                                                        <HeaderStyle Width="28px" HorizontalAlign="Left" />
                                                    </asp:TemplateField>
                                                    <asp:BoundField DataField="LOGINNAME" HeaderText="登录名">
                                                        <HeaderStyle Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:BoundField DataField="USERNAME" HeaderText="姓名">
                                                        <HeaderStyle Width="100px" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField HeaderText="">
                                                        <ItemTemplate>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                </Columns>
                                                <RowStyle CssClass="row" />
                                                <AlternatingRowStyle CssClass="row2" />
                                                <HeaderStyle CssClass="header" />
                                                <PagerStyle CssClass="pager" />
                                            </dp:WebGridView>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="ddlDepartment" EventName="SelectedIndexChanged" />
                                        </Triggers>
                                    </asp:UpdatePanel>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
